/*
 * Copyright (c) 2024. hallele, Inc All rights reserved.
 */

package cn.hallele.infrastructure.message.io;

import jakarta.validation.constraints.NotNull;
import lombok.*;

import java.io.Serial;
import java.io.Serializable;

/**
 * mq消息承载类
 *
 * @param <T> 消息内容
 * @author anle5
 * @since 2024/9/14 21:26
 */

@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Message<T> implements Serializable {
    @Serial
    private static final long serialVersionUID = -7010464038900742706L;

    /**
     * 会话id
     */
    @NotNull
    private String sessionId;

    /**
     * spring steam中的binding名
     */
    private String bindingName;

    /**
     * 消息内容
     */
    private T message;
}
